package ooday01;

public class Test {
    public static void main(String[] args) {
        Student ls=new Student();
        ls.name="李四";
        ls.age=20;
        ls.address="潍坊";
        ls.className="高一三班";
        ls.stuId="123456";
        ls.eat();
        ls.sleep();
        ls.sayHi();
        ls.study();

        Student s=new Student("张三",18,"河北石家庄","高一三班","123456");
        s.eat();
        s.sleep();
        s.sayHi();
        s.study();

        Teacher t=new Teacher("李华",25,"山东",1234.56);
        t.eat();
        t.sleep();
        t.sayHi();
        t.teach();

        Doctor d=new Doctor("张光",35,"廊坊","副主任医师");
        d.eat();
        d.sleep();
        d.sayHi();
        d.cut();
        Person p=new Person();
        p.name="赵静";
        p.age=32;
        p.address="河北保定";
        p.eat();
        p.sleep();
        p.sayHi();
        //p.study();//父类不能访问子类

    }
}
